/**
 * Lab12Test.java
 * 
 * A test harness for the CD class to be completed
 *   in lab.
 *
 * author: Jason
 * for: CSCE145
 */



public class Lab12Test
{


	/**
	 * Note the overloaded checkEqualsMethods here
	 */

	/**
	 * Postcondition: expectedResult is compared with the 
	 *     actualResult and a message is printed indicating
	 *     the testName and if the comparison was passed
	 *     or failed.
	 */
	public static void checkEquals(String testName, 
				String expectedResult, String actualResult){
		//add your code here


	}

	/**
	 * Postcondition: expectedResult is compared with the 
	 *     actualResult and a message is printed indicating
	 *     the testName and if the comparison was passed
	 *     or failed.
	 */
	public static void checkEquals(String testName, 
				boolean expectedResult, boolean actualResult){
		//add your code here


	}

	public static void main(String[] args)
	{
		CD cd1 = new CD("Miss Machine", "The Dillinger Escape Plan", "Relapse");
		CD cd2 = new CD("Ire Works", "The Dillinger Escape Plan", "Relapse");
		
		System.out.println("Testing the accessor methods:");
		Lab12Test.checkEquals("getArtist", "The Dillinger Escape Plan", cd1.getArtist());
		Lab12Test.checkEquals("getTitle", "Miss Machine", cd1.getTitle());
		Lab12Test.checkEquals("getRecordLabel", "Relapse", cd1.getRecordLabel());
		
		System.out.println("Testing equals method and mutators:");
		
		Lab12Test.checkEquals("Only different titles", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Only different titles", false, cd2.equals(cd1));
		
		cd1.setTitle("Ire Works");
		cd1.setArtist("Dillinger Escape Plan");
		Lab12Test.checkEquals("Only different artist", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Only different artist", false, cd2.equals(cd1));
		
		cd1.setArtist("The Dillinger Escape Plan");
		cd1.setRecordLabel("Century Media");
		Lab12Test.checkEquals("Only different label", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Only different label", false, cd2.equals(cd1));
		
		cd1.setRecordLabel("Relapse");
		cd1.setArtist("Dying Fetus");
		cd1.setTitle("Stop at Nothing");
		Lab12Test.checkEquals("Different artist and title", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Different artist and title", false, cd2.equals(cd1));
		
		cd1.setRecordLabel("Elektra");
		cd1.setArtist("Metallica");
		cd1.setTitle("The Black Album");
		cd2.setArtist("Jay-Z");
		cd2.setTitle("The Black Album");
		cd2.setRecordLabel("Def Jam");
		Lab12Test.checkEquals("Different artist and label", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Different artist and label", false, cd2.equals(cd1));
		
		cd1.setTitle("Master of Puppets");
		cd2.setRecordLabel("Megaforce");
		cd2.setTitle("Kill 'Em All");
		cd2.setArtist("Metallica");
		Lab12Test.checkEquals("Different title and label", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Different title and label", false, cd2.equals(cd1));
		
		cd1.setTitle("Ire Works");
		cd1.setArtist("Dillinger Escape Plan");
		cd1.setRecordLabel("Relapse");
		Lab12Test.checkEquals("Different everything", false, cd1.equals(cd2));
		Lab12Test.checkEquals("Different everything", false, cd2.equals(cd1));
		
		cd2.setTitle("Ire Works");
		cd2.setArtist("Dillinger Escape Plan");
		cd2.setRecordLabel("Relapse");
		Lab12Test.checkEquals("Same everything", true, cd1.equals(cd2));
		Lab12Test.checkEquals("Same everything", true, cd2.equals(cd1));
	}
}
